import { modelAdd, modelRemove } from './modelOpera.js';

let allObject = [];

class Z7FrameAdd {
  constructor(scene) {
    const modelData = [
      { url: './model/Z7架柜体.fbx', num: 1, x: -148, y: 52, z: 136.5 },
      {
        url: './model/Z7架室内隔离盒.fbx', children: [
          { num: 4, x: -133, y: -40, z: 154, offsetY: 20 },
        ]
      },
      {
        url: './model/Z7架室内隔离盒.fbx', children: [
          { num: 4, x: -133, y: -40, z: 143, offsetY: 20 },
        ]
      },
      {
        url: './model/Z7架室内隔离盒.fbx', children: [
          { num: 4, x: -130, y: -40, z: 132, offsetY: 20 },
        ]
      },
      {
        url: './model/Z7架室内隔离盒.fbx', children: [
          { num: 3, x: -130, y: -19.8, z: 121, offsetY: 20 },
        ]
      },
      {
        url: './model/Z7架室内隔离盒.fbx', children: [
          { num: 3, x: -130, y: -19.8, z: 110, offsetY: 20 },
        ]
      },
      {
        url: './model/Z7架室内隔离盒.fbx', children: [
          { num: 3, x: -130, y: -19.8, z: 109, offsetY: 20 },
        ]
      },
      {
        url: './model/受电调整电阻盒.fbx', children: [
          { num: 4, x: -130, y: -40, z: 98, offsetY: 20 },
        ]
      },
    ];
    new modelAdd(modelData, (group) => {
      group.position.set(30, 0, -30);
      scene.add(group);
      allObject = group;
    });
  }
}
class Z7FrameRemove {
  constructor(scene) {
    new modelRemove(scene, allObject);
  }
}
export { Z7FrameAdd, Z7FrameRemove };